<script type="text/javascript" >

var str = document.location.hash.substring(1);
var hash = str.split("&")[0].replace("access_token=", "");
document.write(document.location + "<div id='access_token'>" + hash + "</div>");

</script>